package net.kem.android.positioner.responsehandler;

import org.xml.sax.SAXException;

/**
 *
 <message>
	<phoneNumber>0507362270</phoneNumber>    <!-- for debug purposes only -->
	<distance>105300</distance>   //.....in meters
	<interval>20</interval>       //.....in sec 
 </message>
 * @author Zhenya
 *
 */
public class CurrentLocationResponseHandler extends ResponseHandler {	
	private int distance;
	private int interval;

	@Override
	public void endElement(String uri, String localName, String qName) throws SAXException {
		if(localName.equals("distance")) {
			distance = Integer.parseInt(currentValue);
		} else if(localName.equals("interval")) {
			interval = Integer.parseInt(currentValue);
		}
		super.endElement(uri, localName, qName);
	}

	public int getDistance() {
		return distance;
	}

	public int getInterval() {
		return interval;
	}
}